#define _CRT_SECURE_NO_WARNINGS 1

#include"Stack.h"
#include"Queue.h"

void TextStack()
{
	Stack st;
	StackInit(&st);
	Stackpush(&st, 1);
	Stackpush(&st, 2);
	Stackpush(&st, 3);
	Stackpush(&st, 4);
	Stackpush(&st, 5);
	while (!StackEmpty(&st))
	{
		printf("%d ", StackTop(&st));
		Stackpop(&st);
	}
	printf("\n");

	StackDestory(&st);

}

void TextQueue()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	QueuePush(&q, 5);

	while (!QueueEmpty(&q))
	{
		printf("%d ", QueueFront(&q));
		QueuePop(&q);
	}
	printf("\n");

	QueueDestory(&q);
}


int main()
{
	//TextStack();
	TextQueue();
	return 0;
}